<template>
  <div>
      {{list.productInfo || list.productInfo1 || list.productInfo2}}
  </div>
</template>

<script>
import get from "../../axios/index";
export default {
  mounted() {
    this.fetchDate();
  },
  props:["id"],
  data() {
    return {
      list: [],
    };
  },
  watch: {
    //监听路由的变化就更新fetchData的数据
    $route: "fetchDate",
  },
  methods: {
    fetchDate() {
      console.log(this.id);
      let id = this.$route.params.id;
      get(this.$store.state.api + `/getmoneyctrlproduct?productid=${id}`).then(
        (res) => {
          console.log(res.result);
          this.list = res.result[0];
        }
      );
    },
  },
};
</script>

<style></style>
